import http from "../axios/request";
//获取验证码
export const getChptcha = () => http.get("/users/getCaptcha?v=next");
//校验验证码
export const verifyCaptcha = (captcha) =>
  http.get("/users/verifyCaptcha", {
    params: {
      captcha,
    },
  });
//获取手机验证码
export const getSmscode = (phoneNumber) =>
  http.post("/sms/send", { phoneNumber });
//手机验证码登录

export const smslogin = (code) => http.post("/users/login?type=sms", { code });
//用户名登录
export const login = (username, password) =>
  http.post("/users/login", {
    username,
    password,
  });
//获取二维码url
export const getQrcode = (sid) =>
  http.get("/users/getQrcode", { params: { sid } });
//微信登入
export const wechatLogin = (wechatCode) =>
  http.get("/users/wechatLogin", {
    params: {
      wechatCode,
    },
  });
